package com.hanyizhu.demostore.service;

import com.hanyizhu.demostore.entity.Cart;
import com.hanyizhu.demostore.vo.CartVO;

import java.util.Date;
import java.util.List;

/**
 * @author lenovo
 */
public interface ICartService {
    /**
     * 将商品添加到购物车中
     * @param uid 用户id
     * @param pid 商品id
     * @param amount 新增的数量
     * @param username 用户名(修改者)
     */
   void addToCart(Integer uid,Integer pid,Integer amount,String username);

   List<CartVO> getVoByUid(Integer uid);

   Integer addNum(Integer cid, Integer uid,
               String username);

   Integer reduceNum(Integer cid,Integer uid,String username);

   List<CartVO> getVoByCid(Integer uid,Integer ... cid);
}
